package top.yangbuyi.utils;

import cn.hutool.core.date.DateUtil;

/**
 * @ClassName: HisDateUtils
 * @Author: campsis-tk
 * @Date: 2020/9/15 14:51
 * @Description: 计算时间段
 **/
public class HisDateUtils {

	/**
	 * @Description: 得到时段
	 * 1上午
	 * 2下午
	 * 3晚上
	 * @Return: String
	 * @Author: campsis-tk
	 * @Exception:
	 * @Date: 2020/9/15
	 */
	public static String getCurrentTimeType() {
		int hour = DateUtil.hour(DateUtil.date(), true);
		if (hour >= 8 && hour < 12) {
			return "1";
		} else if (hour >= 12 && hour < 18) {
			return "2";
		} else {
			return "3";
		}
	}

}
